{if $options!=''}

{php}$i=0;{/php}

<div class="details_attributes_dropdown">

	<table cellspacing="0">
		{foreach name=outer item=options_data from=$options} 
		{if $options_data.DATA || $GM_HIDE_OUT_OF_STOCK == 'false'}
		<tr>
			<th class="details_attributes_names">
				{$options_data.NAME}:
			</th>
			<td class="details_attributes_options">
				<select class="gm_attr_calc_input lightbox_visibility_hidden" name="id[{$options_data.ID}]" onchange="gm_calc_prices_listing('{$PRODUCTS_ID}')">			
					{foreach key=key_data item=item_data from=$options_data.DATA}
						<option value="{$item_data.ID}" title="{$item_data.TEXT|replace:'"':'&quot;'} {if $item_data.PRICE}{$item_data.PREFIX} {$item_data.PRICE}{/if}{if $GM_SHOW_STOCK == 'true' && $options_data.NAME != 'downloads'} {$GM_STOCK_TEXT_BEFORE|replace:'"':'&quot;'}{$item_data.GM_STOCK}{$GM_STOCK_TEXT_AFTER|replace:'"':'&quot;'}{/if}" {php} if(!isset($chk)) echo 'selected="selected"'; $chk = true; {/php}>{$item_data.TEXT} {if $item_data.PRICE}{$item_data.PREFIX} {$item_data.PRICE}{/if}{if $GM_SHOW_STOCK == 'true' && $options_data.NAME != 'downloads'} {$GM_STOCK_TEXT_BEFORE}{$item_data.GM_STOCK}{$GM_STOCK_TEXT_AFTER}{/if}</option>
					{/foreach}			
				</select>
				{php} unset($chk); $i++; {/php}	
			</td>
		</tr>
		{/if}
		{/foreach}
	</table>

</div>

{/if}